package com.coolingme.battercake.simple;

/**
 * 简单写法，每次煎饼要加新的东西，都要重新写一个去继承前一个类
 *
 * @author wangyue
 * @date 2020-09-15 23:16
 */
public class Test {

    public static void main(String[] args) {
        Battercake battercake = new Battercake();
        System.out.println(battercake.getMsg() + "   " + battercake.getPrice() + "元");

        BattercakeWithEgg battercakeWithEgg = new BattercakeWithEgg();
        System.out.println(battercakeWithEgg.getMsg() + "   " + battercakeWithEgg.getPrice() + "元");

        BattercakeWithEggAndSausage battercakeWithEggAndSausage = new BattercakeWithEggAndSausage();
        System.out.println(battercakeWithEggAndSausage.getMsg() + "   " + battercakeWithEggAndSausage.getPrice() + "元");

    }


}
